#!/usr/bin/perl

open TAGS, "flickr_most_popular_tags" or die;
while (<TAGS>) {
    chomp;
    $path = "thumbnails/$_";
    $new_path = "thumbnails_pgm_sift/$_";
    system("mkdir $new_path");
    foreach (1...20) {
    	system("convert $path/$_ $new_path/$_.pgm ");
    }
}

